<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>::Happy - DTAC Prepaid Phone::</title>
<link href="${RESOURCE}/css/global.css" rel="stylesheet" type="text/css">
<link href="${RESOURCE}/css/global-en.css" rel="stylesheet" type="text/css">
<link href="${RESOURCE}/css/customize.css" rel="stylesheet" type="text/css">
<script src="${RESOURCE}/scripts/security.js" type="text/javascript"></script>
<script type="text/javascript" src="${RESOURCE}/eng/Scripts/Base64.js"> </script>
<script language=JavaScript>
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function printWindow(){
browserVersion = parseInt(navigator.appVersion)
if (browserVersion >= 4) window.print()
}

function include(xUrl,xId) {
  var xmlhttp = false;
  /*@cc_on @*/
  /*@if (@_jscript_version >= 5)

  // JScript gives us Conditional compilation, we can cope with old IE versions.
  // and security blocked creation of the objects.
  try {
    xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
   } catch (e) {
      try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (E) {
        xmlhttp = false;
      }
   }

  /*@end @*/
  if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
    xmlhttp = new XMLHttpRequest();
  }

  xmlhttp.open("GET", xUrl,true);
  xmlhttp.onreadystatechange=function() {
          if (xmlhttp.readyState==4) {
                document.getElementById(xId).innerHTML = xmlhttp.responseText;
          }
  }
  xmlhttp.send(null)
}

	function gotoWelcome(){
		window.location = "/bp3/bin/Dspc/DpromptWelcome";
	}

	function doSchedule(){
//		messageHandler();
		setTimeout("doSchedule()",100);
	}

	function messageHandler(){						
		var len = document.forms['form1'].elements['inputMul'].value.length;

		if (haveThai(document.forms['form1'].elements['inputMul'])){
			if(len == 0){
				document.forms['form1'].elements['totalMsg'].value = 0;
			}
			else if (len <= 70){
				document.forms['form1'].elements['totalMsg'].value = 1;
			}
			else if(len <= 134){
				document.forms['form1'].elements['totalMsg'].value = 2;
			}
			else if(len <= 201){
				document.forms['form1'].elements['totalMsg'].value = 3;
			}
			else{
				document.forms['form1'].elements['totalMsg'].value = 3;
				document.forms['form1'].elements['inputMul'].value = document.forms['form1'].elements['inputMul'].value.substring(0,201);
			}
			document.forms['form1'].elements['count'].value = document.forms['form1'].elements['inputMul'].value.length;
		}else{
			if(len == 0){
				document.forms['form1'].elements['totalMsg'].value = 0;
			}
			else if(len <= 160){ 
				document.forms['form1'].elements['totalMsg'].value = 1;
			}
			else if(len <= 314){
				document.forms['form1'].elements['totalMsg'].value = 2;
			}
			else if(len <= 471){
				document.forms['form1'].elements['totalMsg'].value = 3;
			}
			else{
				document.forms['form1'].elements['totalMsg'].value = 3;
				document.forms['form1'].elements['inputMul'].value = document.forms['form1'].elements['inputMul'].value.substring(0,471);
			}
			document.forms['form1'].elements['count'].value = document.forms['form1'].elements['inputMul'].value.length;
		}	
	}

	function convertTo9digits(digits7Object,digits9Object){
		if(checkInput(digits7Object)){
			digits9Object.value = "";

			if(digits7Object.value != ""){
				digits9Object.value = digits7Object.value;
			}
		}else{
			return false;
		}

		return true;
	}

	function isInt(textObj){
		var newValue = textObj.value;
		var newLength = newValue.length;

		for(var i = 0;i != newLength; i++){
			aChar = newValue.substring(i,i+1);

			if(aChar < "0" || aChar > "9") {return false;}
		}

		return true;     
	}

	function checkInput(digits7Object){
		if ( ! isInt(digits7Object)){
			alert("Please enter the 10 digit phone number e.g. 0812345678  ");
			digits7Object.focus();

		}else if ((digits7Object.value.length > 0)&&(digits7Object.value.length < 10)){
			alert("Please enter the 10 digit phone number e.g. 0812345678");
			digits7Object.focus();

		}else{
			return true;
		}
		
		return false;
	}

	function haveThai(mulObject){
		var i;
		var aChar;

		for (i=0;i<mulObject.value.length;i++){
			aChar = mulObject.value.substring(i,i+1);

			if ( (aChar >= "ก") && (aChar <="๙") )
				return true;
		}

		return false;
	}

	function doLoad(){
		MM_preloadImages('${RESOURCE}/eng/images/14_webservice_msgtab01_i.gif','${RESOURCE}/eng/images/14_webservice_msgtab02_i.gif','${RESOURCE}/eng/images/14_webservice_msgtab03_i.gif','${RESOURCE}/eng/images/14_webservice_msgtab04_i.gif')

		
	}

	function doSubmit(){
		var sevenDigit = new Array();

		sevenDigit[0] = document.form1.phoneNo71;
		sevenDigit[1] = document.form1.phoneNo72;
		sevenDigit[2] = document.form1.phoneNo73;
		sevenDigit[3] = document.form1.phoneNo74;
		sevenDigit[4] = document.form1.phoneNo75;

		var nineDigit = new Array();

		nineDigit[0] = document.form1.inputSubrNumb1;
		nineDigit[1] = document.form1.inputSubrNumb2;
		nineDigit[2] = document.form1.inputSubrNumb3;
		nineDigit[3] = document.form1.inputSubrNumb4;
		nineDigit[4] = document.form1.inputSubrNumb5;

		document.form1.inputSubrNumb1.value = document.form1.phoneNo71.value;
		document.form1.inputSubrNumb2.value = document.form1.phoneNo72.value;
		document.form1.inputSubrNumb3.value = document.form1.phoneNo73.value;
		document.form1.inputSubrNumb4.value = document.form1.phoneNo74.value;
		document.form1.inputSubrNumb5.value = document.form1.phoneNo75.value;

		if (document.form1.inputMul.value == ""){
			alert("Please enter your message");
			document.form1.inputMul.focus();

			return;
		}

		if (haveThai(document.form1.inputMul)){
			document.form1.haveThai.value = "Y";
		}else{
			document.form1.haveThai.value = "N";
		}

		if (document.form1.AuthorCode.value.length == 0){
			alert("Please enter the validation code");
			document.form1.AuthorCode.focus();

			return;
		}



		if ( (document.form1.AuthorCode.value.length < 5) || !isInt(document.form1.AuthorCode) ){
			alert ("Please enter the 5 digit the validation code")
			document.form1.AuthorCode.focus();

			return;
		}

		var isMobile = false;

		for (var i = 0;i < 5;i++){
			if (sevenDigit[i].value != "") 
				isMobile = true;
		}

		if (! isMobile){
			alert ("Please enter phone number(s)");
			document.form1.phoneNo71.focus();

			return;
		}

		if(sevenDigit[0]!=""){
			if((convertTo9digits(sevenDigit[0],nineDigit[0]))&&
			(convertTo9digits(sevenDigit[1],nineDigit[1]))&&
			(convertTo9digits(sevenDigit[2],nineDigit[2]))&&
			(convertTo9digits(sevenDigit[3],nineDigit[3]))&&
			(convertTo9digits(sevenDigit[4],nineDigit[4]))){
				//return true;
				document.form1.submit();
			}

			return;
		}

		//return true;
		document.form1.submit();
	}	

	function selectyear(year)
	{
		if(myyear.value % 4 == 0)
		{
			var MonthDays = new Array(00,31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
		}
		else if(myyear.value % 4 != 0)
		{
			var MonthDays = new Array(00,31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
		}
	}

	function clearr(PathListDay)
	{
		for(var i=PathListDay.options.length;i>=0;i--)
			PathListDay.options[i]=null;
		PathListDay.selectedIndex = -1;
	}

	function ChangeDay(ThisMonth,SelectMonth)
	{
		clearr(document.form1.day);
		var count=0;
		if(ThisMonth != SelectMonth.value)
		{
			for(ReDay=0;ReDay<MonthDays[SelectMonth.value];ReDay++)
			{ 
				count++;
				document.form1.day.options[ReDay]=new Option(count,count,true); 
			}
		}
		else if(ThisMonth = SelectMonth.value)
		{
			var x=0;
			for(d=mydate;d<=MonthDays[mymonth];d++)
			{
				document.form1.day.options[x]=new Option(d,d,true);
				x++;
			}
		}
	}

if ("".length != 0)
{
    alert("");
}

</script><script language="javascript" >
function gotoPage() {
	save2hiddenfld();
	var p = document.form1.selectedpage.value;
	//alert("Page : "+p);
	url = "/bp3/bin/SelectPhonebook?page="+p;
		
	document.form1.method = 'post';
	document.form1.action = url;
	document.form1.submit();
}
//function changePage(p) {
//	save2hiddenfld();
//	url = "/bp3/bin/SelectPhonebook?page="+p;
//					
//	document.form1.method = 'post';
//	document.form1.action = url;
//	document.form1.submit();
//}
function save2hiddenfld() {
	var tbl = document.getElementById('SendSmsList');
	var lastRow = tbl.rows.length;		  
	var tmpPhoneName,tmpPhoneNo,i  ;

	if (tbl.tBodies[0].rows[0]) {
		for (i=0; i<lastRow; i++) {			
			tmpPhoneName = tbl.tBodies[0].rows[i].cells[2].innerHTML  ;
			tmpPhoneNo = tbl.tBodies[0].rows[i].cells[3].innerHTML  ;	
//alert(i+'='+tmpPhoneName);
			document.forms['form1'].elements['Pname'+(i+1)].value =  tmpPhoneName ;
			document.forms['form1'].elements['Pnumb'+(i+1)].value =  tmpPhoneNo ;
		}
	}			
}
function addPhonebook(the_form, url) 
{
	//var total_row = parseInt('18');
	//if ( total_row >= ) {
		//alert("ขณะนี้ Phonebook ของคุณมีเบอร์โทรศัพท์ครบ  เบอร์แล้ว คุณจึงไม่สามารถเพิ่มเบอร์ใหม่ได้");
		//return false;
	//}
	//save2hiddenfld();
//if (!document.forms[the_form].elements['selectedpage']) {
	var p = 1;
//}
//else {
	//var p = document.form1.selectedpage.value;
//}
	url = url+"?page="+p;
	document.forms[the_form].method = 'post';
	document.forms[the_form].action = url;
	document.forms[the_form].submit();
	return true;
}
function editPhonebook(the_form, the_elements, url) 
{
	if (!document.forms[the_form].elements[the_elements]) 
	{
		// No found checkbox in form
		alert("You can not selected contact you want to edit");
		return;
	}
	var elts   =  document.forms[the_form].elements[the_elements];
    	var elts_cnt  = (typeof(elts.length) != 'undefined')? elts.length:0;
	var edit_cnt = 0;
	var result = "";
	if (elts_cnt) 
	{
        	for (var i = 0; i < elts_cnt; i++) 
        	{
            		if (elts[i].checked) 
            		{
				result = elts[i].value;
				edit_cnt++;
				if (edit_cnt > 1)
				{
					alert("You can edit phone number 1 number only");
					return;
				}
	    		}
		}
		if (edit_cnt == 0)
		{
			//alert("You did not select contact to edit");
alert("You may not have selected contact you want to edit. Please check box the contact you want to edit");
			return;
		}
		//return true;
	} 
	else 
	{
	        if (elts.checked) 
	        {
			result = elts.value;
			//return true;
		}
		else
		{
alert("You may not have selected contact you want to edit. Please check box the contact you want to edit");
			return;
		}
	}
	//save2hiddenfld();
	if (!document.forms[the_form].elements['selectedpage']) { 
		var p = 1;	
	}
	else {
		var p = document.form1.selectedpage.value;
	}
	
	url = url+"?page="+p+"&id="+result;
        /*	
        //alert(url);
        var result = window.open(url ,'add','width=700,height=570')
        if (result)
        {   
            alert("Save Complete.");
            form.submit();
        }
        */
	MM_openBrWindow(url ,'add','width=700,height=570');
	//document.forms[the_form].method = 'post';
	//document.forms[the_form].action = url;
	//document.forms[the_form].submit();
	//return true;
}
function delPhonebook(the_form, the_elements, url) 
{

    	MM_openBrWindow('/bp3/bin/ClosePage' ,'add','width=700,height=550');

	if (!document.forms[the_form].elements[the_elements]) 
	{
		// No found checkbox in form
        alert("You can not selected contact you want to delete");
		return;
	}
	var elts   =  document.forms[the_form].elements[the_elements];
    	var elts_cnt  = (typeof(elts.length) != 'undefined')? elts.length:0;
	var del_cnt = 0;
	var result = "";
	if (elts_cnt) 
	{
        	for (var i = 0; i < elts_cnt; i++) 
        	{
            		if (elts[i].checked) 
            		{
				result = elts[i].value;
				del_cnt++;
				if (del_cnt > 1)
				{
					//alert("You must be select one contact to edit only");
					//return false;
				}
	    		}
		}
		if (del_cnt == 0)
		{
			//alert("You did not select contact to edit");
            alert("You may not have selected contact you want to delete. Please check box the contact you want to delete");
			return;
		}
		//return true;
	} 
	else 
	{
	        if (elts.checked) 
	        {
			del_cnt++;
			result = elts.value;
			//return true;
		}
		else
		{
            alert("You may not have selected contact you want to delete. Please check box the contact you want to delete");
			return;
		}
	}
	if (confirm('Please confirm if you want to erase this record in the phonebook?')) {
		//save2hiddenfld();
		if (!document.forms[the_form].elements['selectedpage']) { 
			var p = 1;	
		}
		else {
			var p = document.form1.selectedpage.value;
		}
		url = url+"?page="+p+"&command=delete";
		document.forms[the_form].method = 'post';
		document.forms[the_form].action = url;
		document.forms[the_form].submit();
	}
	return;
}
</script>

<script language="javascript">
var max_send_sms = 5 ;
var ROW_BASE = 1; // first number (for display)

function LTrim(VALUE) {
	var w_space = String.fromCharCode(32);
	if(v_length < 1) {
		return"";
	}
	var v_length = VALUE.length;
	var strTemp = "";	
	var iTemp = 0;
	
	while(iTemp < v_length){
	  	if(VALUE.charAt(iTemp) == w_space){
	  	} else {
			strTemp = VALUE.substring(iTemp,v_length);
			break;
	  	}
	  	iTemp = iTemp + 1;
	} //End While
	return strTemp;
} //End Function
 
function RTrim(VALUE) {
	var w_space = String.fromCharCode(32);
	var v_length = VALUE.length;
	var strTemp = "";
	if(v_length < 0){
  		return"";
	}
	var iTemp = v_length -1;
	while(iTemp > -1)	{
  		if(VALUE.charAt(iTemp) == w_space){
  		} else {
		    strTemp = VALUE.substring(0,iTemp +1);
    		break;
        }
		iTemp = iTemp-1;
	} //End While
	return strTemp;
} //End Function
  
function Trim(TRIM_VALUE) {
	if(TRIM_VALUE.length < 1){
	  return"";
	}
	TRIM_VALUE = RTrim(TRIM_VALUE);
	TRIM_VALUE = LTrim(TRIM_VALUE);
	if(TRIM_VALUE==""){
	  return "";
	}
	else{
	  return TRIM_VALUE;
	}
}
function getNumbCheckBox(the_form, the_elements) {
			if (!document.forms[the_form].elements[the_elements]) {
				return false;
			}
			var counter = 0 ;
			var elts   =  document.forms[the_form].elements[the_elements];
			var elts_cnt  = (typeof(elts.length) != 'undefined')? elts.length:0;
			if (elts_cnt) {
				for (var i = 0; i < elts_cnt; i++) {
					if (elts[i].checked) {
						counter++ ;
					}
				}
			}  else {
				if (elts.checked)  {
					counter++ ;
				}
			}
			return counter ;
}	
function deleteCurrentRow(obj)
{
//	if (hasLoaded) {
		var delRow = obj.parentNode.parentNode;
		var tbl = delRow.parentNode.parentNode;
		var rIndex = delRow.sectionRowIndex;
		var rowArray = new Array(delRow);
		deleteRows(rowArray);
		reorderRows(tbl, rIndex);
//	}
}
function deleteRows(rowObjArray)
{
	//if (hasLoaded) {
		for (var i=0; i<rowObjArray.length; i++) {
			var rIndex = rowObjArray[i].sectionRowIndex;
			rowObjArray[i].parentNode.deleteRow(rIndex);
		}
	//}
}
function reorderRows(tbl, startingIndex)
{
	//if (hasLoaded) {
		if (tbl.tBodies[0].rows[startingIndex]) {
			var count = startingIndex + ROW_BASE;
			for (var i=startingIndex; i<tbl.tBodies[0].rows.length; i++) {			
				var column_1 = tbl.tBodies[0].rows[i].cells[1]  ;
			 	textNode_2 = document.createTextNode(i + 1);		
				column_1.removeChild(column_1.childNodes(0)) ;
		  		column_1.appendChild(textNode_2)	 ;	
				count++;
	name2 = document.forms['form1'].elements['Pname'+(i+2)].value;
	numb2 = document.forms['form1'].elements['Pnumb'+(i+2)].value;
	document.forms['form1'].elements['Pname'+(i+1)].value =  name2;
	document.forms['form1'].elements['Pnumb'+(i+1)].value =  numb2;
//alert(i);
			}
		}
	//}
}
function addRowToTable(tblName,column_1_innerHTML,column_2_innerHTML,column_3_innerHTML,column_4_innerHTML) {	
	//addRowToTable('AddrBookList','column_1','column_2') ;		
	var tbl = document.getElementById(tblName);
	var lastRow = tbl.rows.length;		  
	// check over row limit to created
	if(lastRow > max_send_sms) {
		alert("over your limit") ;
		return false ;
	}		  
	var iteration = lastRow;
	var row = tbl.insertRow(lastRow);
	row.bgColor =  "#dff1ff" ;
	row.setAttribute("backgroundColor", "#dff1ff") ;			
	row.onmouseover = function() { row.bgColor =  "#FFCCCC" ;	}
	row.onmouseout = function() { row.bgColor =  "#dff1ff" ; }						
	//#dff1ff
	// add column 1 // delete column

	
	var column_1 = row.insertCell(0);
	column_1.setAttribute("width", "11%") ;
	//column_1.setAttribute("bgcolor", "#dff1ff") ;	
	var eleDelImg = document.createElement("img");
			eleDelImg.id = 'id_'+lastRow ;
			eleDelImg.setAttribute("src", "${RESOURCE}/eng/images/b_drop.png");
 			eleDelImg.onclick = function() { deleteCurrentRow(this) ; }
			column_1.appendChild(eleDelImg);			 
	// add column 2 // row num	  
	var column_2 = row.insertCell(1);
	column_2.setAttribute("width", "9%") ;
	var textNode_2 = document.createTextNode(iteration+1);
		  column_2.appendChild(textNode_2)

	var column_3 = row.insertCell(2);
	column_3.setAttribute("width", "19%") ;
	//column_3.setAttribute("style","padding-left:5px; word-break: break-all;");
	/*
	var eleStyle = document.createElement("div");
			eleStyle.setAttribute("align", "\"left\"");
			eleStyle.className = "padding_wordbreak";
			column_3.appendChild(eleStyle);			 
	//var t = '<div align="left" style="padding-left:5px; word-break: break-all;" width="20">'+column_1_innerHTML+'</div>';	
	*/

	var replaceSPC = replaceSpecialChar(column_1_innerHTML);
	var textNode_3 = document.createTextNode(replaceSPC );

	column_3.appendChild(textNode_3);	
	column_3.innerHTML='<div align="left" style="padding-left:5px; word-break: break-all;" width="20">'+column_1_innerHTML+'</div>';
		//	elem.href = gotoalert() ;
		//	elem.setAttribute("height", "40");
		//	elem.setAttribute("width", "120");
		//	elem.setAttribute("alt", "GiantCo Logo");



	 // select cell
	  var column_4 = row.insertCell(3);
 	column_4.setAttribute("width", "19%") ;
	var textNode_4 = document.createTextNode(column_2_innerHTML);
	//textNode = document.createTextNode(column_1);
	column_4.appendChild(textNode_4); 
	//Pooh
	var column_5 = row.insertCell(4);
 	column_5.setAttribute("width", "20%") ;
	var textNode_5 = document.createTextNode(column_3_innerHTML);
	//textNode = document.createTextNode(column_1);
	column_5.appendChild(textNode_5);
	
	var column_6 = row.insertCell(5);
 	column_6.setAttribute("width", "22%") ;
	var textNode_6 = document.createTextNode(column_4_innerHTML);
	//textNode = document.createTextNode(column_1);
	column_6.appendChild(textNode_6);
	
	document.forms['form1'].elements['Pname'+(lastRow+1)].value =  column_1_innerHTML ;
	document.forms['form1'].elements['Pnumb'+(lastRow+1)].value =  column_2_innerHTML ;
}


function addPhonebookToTable(tblName,column_1_innerHTML,column_2_innerHTML, decode) {	
	var tbl = document.getElementById(tblName);
	var lastRow = tbl.rows.length;		  
	// check over row limit to created
	if(lastRow > max_send_sms) {
		alert("over your limit") ;
		return false ;
	}		  
	var iteration = lastRow;
	var row = tbl.insertRow(lastRow);
	row.bgColor =  "#dff1ff" ;
	row.setAttribute("backgroundColor", "#dff1ff") ;			
	row.onmouseover = function() { row.bgColor =  "#FFCCCC" ; }
	row.onmouseout = function() { row.bgColor =  "#dff1ff" ; }						
	
	var column_1 = row.insertCell(0);
	column_1.setAttribute("width", "11%") ;
	var eleDelImg = document.createElement("img");
			eleDelImg.id = 'id_'+lastRow ;
			eleDelImg.setAttribute("src", "${RESOURCE}/eng/images/b_drop.png");
 			eleDelImg.onclick = function() {deleteCurrentRow(this) ;}
	column_1.appendChild(eleDelImg);			 

	var column_2 = row.insertCell(1);
	column_2.setAttribute("width", "11%") ;
	var textNode_2 = document.createTextNode(iteration+1);
	column_2.appendChild(textNode_2)


	var column_3 = row.insertCell(2);
	column_3.setAttribute("width", "44%") ;
	if (decode == 'decode') {
//alert(column_1_innerHTML);
		var replaceSPC = _utf8_decode(base64decode(column_1_innerHTML));
//alert(replaceSPC);
replaceSPC  = replaceSpecialChar(replaceSPC );
		var textNode_3 = document.createTextNode(replaceSPC);
		column_3.appendChild(textNode_3 );
		column_3.innerHTML='<div align="left" style="padding-left:5px; word-break: break-all;" width="20">'+replaceSPC +'</div>';		  
		//column_3.innerHTML= textNode_3 ;
	}
	else {
		//var replaceSPC = replaceSpecialChar(column_1_innerHTML);
		var replaceSPC = column_1_innerHTML;
		var textNode_3 = document.createTextNode(replaceSPC );
		column_3.appendChild(textNode_3 );	
		column_3.innerHTML='<div align="left" style="padding-left:5px; word-break: break-all;" width="20">'+replaceSPC +'</div>';		  
		//column_3.innerHTML= textNode_3 ;	  
	}
	

	var column_4 = row.insertCell(3);
 	column_4.setAttribute("width", "34%") ;
	var textNode_4 = document.createTextNode(column_2_innerHTML);
	column_4.appendChild(textNode_4); 

	document.forms['form1'].elements['Pname'+(lastRow+1)].value =  replaceSPC;
	document.forms['form1'].elements['Pnumb'+(lastRow+1)].value =  column_2_innerHTML;
}

function insertSelectedPhonebook() {


}

function gotoAddSendSMS() {

	var resultNumbCheckBox =  getNumbCheckBox('form1','PhonebookId[]') ;
	if((!resultNumbCheckBox) || (resultNumbCheckBox==0)) {
		//alert("Please select phone book") ;
		//alert("คุณยังไม่ได้เลือกเบอร์ที่ต้องการแก้ไข กรุณาเลือกเบอร์ที่ต้องการแก้ไขเสียก่อน");
		alert("You may not have selected contact. Please check box the contact");
		return false ;
	}
	
	var tbl = document.getElementById('SendSmsList');
	var lastRow = tbl.rows.length;		
	if(  (resultNumbCheckBox  + lastRow) > max_send_sms) {
		//alert("over your limit") ;
		alert("You can send up to 5 SMS simultaneously");
		return false ;
	}	
	var elts   =  document.forms['form1'].elements['PhonebookId[]'];
	var elts_cnt  = (typeof(elts.length) != 'undefined')? elts.length:0;	var elts   =  document.forms['form1'].elements['PhonebookId[]'];
	var elts_cnt  = (typeof(elts.length) != 'undefined')? elts.length:0;	
	// ***********Check duplicate number**************
	/*var elts   =  document.forms['form1'].elements['PhonebookId[]'];
	var elts_cnt  = (typeof(elts.length) != 'undefined')? elts.length:0;	var elts   =  document.forms['form1'].elements['PhonebookId[]'];
	var elts_cnt  = (typeof(elts.length) != 'undefined')? elts.length:0;	
	if (elts_cnt) {
		for (i = 0; i < elts_cnt; i++) {
					if (elts[i].checked) {														
						tr_obj = document.getElementById('tr_'+(i+1)) ;							
							for(j=0;j<lastRow;j++) {
									if( tr_obj.cells[3].childNodes(0).innerHTML == tr_obj.cells[3].childNodes(0).innerHTML ) {
									}
								addRowToTable('SendSmsList',tr_obj.cells[2].childNodes(0).innerHTML,) ;
	
							}	
					}
		}
	}  else {
		if (elts.checked)  {
				tr_obj = document.getElementById('tr_1') ;				
				addRowToTable('SendSmsList',tr_obj.cells[2].childNodes(0).innerHTML,tr_obj.cells[3].childNodes(0).innerHTML) ;		
			
}
	}*/
	//******************************************	
		
	//alert("sss") ;

	if (elts_cnt) {
		for (var i = 0; i < elts_cnt; i++) {
					if (elts[i].checked) {									
						tr_obj = document.getElementById('tr_'+(i+1)) ;							
						addRowToTable('SendSmsList',tr_obj.cells[2].childNodes(0).innerHTML,tr_obj.cells[4].childNodes(0).innerHTML,tr_obj.cells[3].childNodes(0).innerHTML,tr_obj.cells[5].childNodes(0).innerHTML) ;	
						elts[i].checked = false  ;
					}
		}
	}  else {
		if (elts.checked)  {
				tr_obj = document.getElementById('tr_1') ;				
				addRowToTable('SendSmsList',tr_obj.cells[2].childNodes(0).innerHTML,tr_obj.cells[3].childNodes(0).innerHTML,tr_obj.cells[4].childNodes(0).innerHTML,tr_obj.cells[3].childNodes(0).innerHTML,tr_obj.cells[5].childNodes(0).innerHTML) ;		
				elts.checked = false  ;
		}
	}
	
	//
/*	var resultRadio =  isValidRadio(document.forms['form1'].elements['radioPhoneBook']) ;
	if(!resultRadio) {
		alert("Please select phone book") ;
		return false ;
	}
	alert(resultRadio) ;
	var column_1 = document.forms['form1'].elements['phoneBookName_'+resultRadio].value ;
	var column_2 = document.forms['form1'].elements['phoneBookNumber_'+resultRadio].value ;	
	addRowToTable('tblName',column_1,column_2) ; */
}

function gotoSubmitPhoneBook() {
	//** Template Operner :  WebSmsGreetingForm
	var tbl = document.getElementById('SendSmsList');
	var lastRow = tbl.rows.length;		  
	var tmpPhoneName,tmpPhoneNo,i  ;


	if (tbl.tBodies[0].rows[0]) {
		for (i=0; i<lastRow; i++) {			
			//tmpPhoneName = tbl.tBodies[0].rows[i].cells[2].innerHTML  ;
			//tmpPhoneNo = tbl.tBodies[0].rows[i].cells[3].innerHTML  ;
			tmpPhoneName = document.forms['form1'].elements['Pname'+(i+1)].value;
			tmpPhoneNo = document.forms['form1'].elements['Pnumb'+(i+1)].value;
			tmpPhoneName = tmpPhoneName.replace(/&lt;/g,"<");
			tmpPhoneName = tmpPhoneName.replace(/&gt;/g,">");
			tmpPhoneName = tmpPhoneName.replace(/&quot;/g,"\"");
			tmpPhoneName = tmpPhoneName.replace(/&#039;/g,"\'");
			tmpPhoneName = tmpPhoneName.replace(/&#092;/g,"\\");
			tmpPhoneName = tmpPhoneName.replace(/&amp;/g,"&");
			window.opener.document.forms['form1'].elements['phoneName7'+(i+1)].value =  tmpPhoneName;
			window.opener.document.forms['form1'].elements['phoneNo7'+(i+1)].value =  tmpPhoneNo ;
		}
	}			
	window.close() ;
}


function replaceSpecialChar(str) {
	str = str.replace(/&lt;/g,"<");
	str = str.replace(/&gt;/g,">");
	str = str.replace(/&quot;/g,"\"");
	str = str.replace(/&#039;/g,"\'");
	str = str.replace(/&#092;/g,"\\");
	str = str.replace(/&amp;/g,"&");
	return str;
}

function replaceSpecialChar2Ascii(str) {
	str = str.replace(/</g,"&lt;");
	str = str.replace(/>/g,"&gt;");
	str = str.replace(/\"/g,"&quot;");
	str = str.replace(/\'/g,"&#039;");
	str = str.replace(/\\/g,"&#092;");
	str = str.replace(/&/g,"&amp;");
	return str;
}

function replaceSingleQuote(str) {
	str = str.replace(/'/,"\'");
	return str;
}
</script>
<SCRIPT language=JavaScript type=text/JavaScript>
function chkData()
{
    if(document.form1.DispName.value == "" ) 
    {
        alert("Please Enter Display name") ;
        document.form1.DispName.focus() ;
        return false;
    }
    if(document.form1.MobileNumber.value == "" ) 
    {
        alert("Please Enter Mobile Number") ;
        document.form1.MobileNumber.focus() ;
        return false;
    }
    else
    {
        if (document.form1.MobileNumber.value.search("[^0-9%]") != -1)
        {
	    alert("Mobile Number is accept numeric only");
            document.form1.MobileNumber.focus() ;
            return false;
        }
        if( document.form1.MobileNumber.value.length != 10) 
        {
	    alert("Mobile Number has to be 10 digits") ;
            document.form1.MobileNumber.focus() ;
            return false;
        }
    }

    return true;
}
function doSubmit()
{
    if (chkData()) {
        document.form1.submit();
    }
}
function search(){
		if(document.form1.name.value != "" && !checkTextNoScript(document.form1.name.value)){
		        alert("The field(s) for this contact cannot contain any special charectors in search name. You may not have entered search name.") ;
		        document.form1.name.focus() ;
		        return false;
		}
        document.forms['form1'].method = 'post';
        document.forms['form1'].action = '/bp3/bin/Dspc/SMSPhoneBookList';
        document.forms['form1'].command.value = "search";
        document.forms['form1'].submit();
}

function doCancel()
{
        var page = document.form1.page.value;
        document.forms['form1'].method = 'post';
        document.forms['form1'].action = 'SMSPhoneBookList?page=' + page;
        document.forms['form1'].submit();
}

function changePage(page)
{
        document.forms['form1'].action = "SMSPhoneBookList";
        document.forms['form1'].method = 'post';
        document.forms['form1'].page.value = page;
        document.forms['form1'].command.value = "search";
        document.forms['form1'].submit();
}

function doSortDesc(val1, val2, val3)
{
    var form = document.forms[0];
    form.method = "post";
    form.action = "SMSPhoneBookList";
    form.desc.value = val1;
    form.desc_fname.value = val2;
    form.desc_lname.value = val3;
    form.submit();
}

function chkKeyEnter()
{
    if (event.keyCode==13)
    {
        search();
    }
    else
    {
        return;
    }
}
</SCRIPT>
</head>

<body>
<div id="header">
    <%@include file="../head.jsp" %>
</div>

<div id="container">
	<div id="pathway"><a href="#" class="link2">Happy Web Services</a> > <a href="#" class="link2">Terms and conditions of SMS service</a></div>
	<div id="main">
    	<%@ include file="../menu.jsp" %>
    	<div id="content">
        	<div class="content-middle">
                
                <!--เนื้อหาเริ่มที่นี่-->   
                
                <table width="100%" border="0">
                      <tr>
                        <td>
						<!-- เอา Content ใส่ ระหว่างนี้ -->

						
													<form name="form1" method="post" onSubmit="return doSubmit()">
													<input type="hidden" name="haveThai" value="">
													<input type="hidden" name="page" value="">
													<input type="hidden" name="desc" value="">
                                                    <input type="hidden" name="desc_fname" value="">
                                                    <input type="hidden" name="desc_lname" value="">
                                                    <input type="hidden" name="command">
													<table width="650" border="0" cellspacing="0" cellpadding="0">
														
  <tr> 
    <td height="30" valign="top"><img src="${RESOURCE}/eng/images/14_webservice_head01.gif"></td>

  </tr>
  <tr> 
    <td height="40" class="textnormal"><table width="100%" border="0" cellspacing="2" cellpadding="5">
        <tr> 
          <td class="textnormal">Hello! <span class="textnormal_blue"><strong>วิทยา อภิมหาบุณย์</strong></span> Welcome to Happy Web Services!</td>
          <td align="right"> <table height="30" border="0" align="right" cellpadding="0" cellspacing="0">
            <tr>

              <!--<td align="center" valign="middle"><a href="/bp3/bin/Dspc/DpromptWelcome?changeLang=T"><img src="${RESOURCE}/eng/images/en_flag.gif" width="30" height="16" border="0"></a></td>
              <td width="10" align="center"><img src="${RESOURCE}/eng/images/14_webservice_breaker.gif" width="3" height="27"></td>-->
              <td align="center"><a href="/bp3/bin/DpromptIndex"><img src="${RESOURCE}/eng/images/14_webservice_logoff.gif" width="108" height="29" border="0"></a></td>
            </tr>
          </table>            </td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td height="1" bgcolor="#B4B4B4"></td>

  </tr>
  <tr> 
    <td class="textnormal"><table width="100%" border="0" cellspacing="2" cellpadding="5">
        <tr> 
          <td align="right" valign="top" class="textnormalred">This is the 46th time you've visited Happy.<br>
          The last time you logged in was on: 15/02/2011 at  10:36:53 <br>
          <span class="textnormal"><img src="${RESOURCE}/eng/images/bullet_yellow.gif" width="8" height="8"> <a href="/bp3/bin/Dspc/DpromptChangeUserInfoForm" class="textnormal_blue">Click to modify your personal information</a></span></td>
        </tr>

      </table></td>
  </tr>
													  
													  <tr> 
													    <td> 
													    
													      
														  	<table width="100%" border="0" cellspacing="3" cellpadding="0">
                                                              <tr>
                                                                <td width="2%"><img src="${RESOURCE}/eng/images/14_webservice_bullet01.gif" width="9" height="9" width="9" height="9"></td>
                                                                <td width="98%" class="textnormal_bold"><img src="${RESOURCE}/eng/images/14_webservice_subtitle17n.gif" width="350" height="22"></td>
                                                              </tr>
                                                              <tr>

                                                                <td>&nbsp;</td>
                                                                <td height="40" valign="bottom" class="textnormal"><table width="100%" border="0" cellspacing="3" cellpadding="0">
                                                                    <tr>
                                                                      <td width="2%" valign="baseline"><img src="${RESOURCE}/eng/images/bullet_grey.gif" width="9" height="9"></td>
                                                                      <td width="98%"  class="textnormal">Send <span class="textnormalred_bold"> 50</span> SMS for free to dtac numbers. Messages sent over this monthly quota will be charged <span class="textnormalred_bold"> 2 </span> baht per message.</td>

                                                                    </tr>
                                                                    <tr>
                                                                      <td valign="baseline"><img src="${RESOURCE}/eng/images/bullet_grey.gif" width="9" height="9"></td>
                                                                      <td class="textnormal"> Messages sent non-dtac numbers will be charged <span class="textnormalred_bold"> 2 </span> baht per message.</td>
                                                                    </tr>
                                                                </table></td>

                                                              </tr>
                                                              <tr>
                                                                <td>&nbsp;</td>
                                                                <td height="50" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                                    <tr>
                                                                      <td width="17%" class="textnormal_bold">For this month:</td>
                                                                      <td width="83%" class="textnormal">You have already sent free <span class="textnormalred_bold">0
                                                                      </span>  message(s) </td>

                                                                    </tr>
                                                                    <tr>
                                                                      <td>&nbsp;</td>
                                                                      <td class="textnormal">  You can send   <span class="textnormalred_bold">
                                                                          50
                                                                      </span>  more message(s)  </td>
                                                                    </tr>

                                                                </table></td>
                                                              </tr>
                                                            </table></td>
													  </tr>
													  <tr>
    													<td height="15" align="center"><br>
      														<table width="100%" border="0" cellspacing="0" cellpadding="0">
        														<tr>
          															<td background="${RESOURCE}/eng/images/14_webservice_tabline.gif">&nbsp;</td>

          															<td width="1"><a href="/bp3/bin/Dspc/DpromptSMSForm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('msg01','','${RESOURCE}/eng/images/14_webservice_msgtab01_i.gif',1)"><img src="${RESOURCE}/eng/images/14_webservice_msgtab01.gif" name="msg01" width="140" height="43" border="0"></a></td>
          															<td width="1"><a href="/bp3/bin/Dspc/SMSPhoneBookList" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('msg02','','${RESOURCE}/eng/images/14_webservice_msgtab02_i.gif',1)"><img src="${RESOURCE}/eng/images/14_webservice_msgtab02_i.gif" name="msg02" width="140" height="43" border="0"></a></td>
          															<td width="1"><a href="/bp3/bin/Dspc/SMSSchedule" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('msg03','','${RESOURCE}/eng/images/14_webservice_msgtab03_i.gif',1)"><img src="${RESOURCE}/eng/images/14_webservice_msgtab03.gif" name="msg03" width="140" height="43" border="0"></a></td>
          															<td width="1"><a href="/bp3/bin/Dspc/SMSDrReport" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('msg04','','${RESOURCE}/eng/images/14_webservice_msgtab04_i.gif',1)"><img src="${RESOURCE}/eng/images/14_webservice_msgtab04.gif" name="msg04" width="140" height="43" border="0"></a></td>
          															<td background="${RESOURCE}/eng/images/14_webservice_tabline.gif">&nbsp;</td>
        														</tr>
      														</table>														</td>
	  												  </tr>

													  <tr> 
													    <td height="15" align="center"><br>
													    <br></td>
													  </tr>
													  <tr> 
													    <td height="15" align="left">
															<table width="95%" border="0" align="center" cellpadding="2" cellspacing="2">
																<tr>
																	<td>
																		<table width="100%" border="0" cellspacing="3" cellpadding="0">

																			<tr> 
																			  <td width="2%"><img src="${RESOURCE}/eng/images/14_webservice_bullet01.gif" width="9" height="9"></td>
																			  <td width="98%" class="textnormalred_bold">See all details in phone book</td>
																			</tr>
																	  </table>																	</td>
																</tr>
																<tr> 
																	<td height="15" align="center">&nbsp;</td>
																</tr>	
																<tr>

																	<td height="15" align="left">
																		<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
																		  <tr>
																			<td width="1"><img src="${RESOURCE}/eng/images/14_table_01.gif" width="10" height="10" /></td>
																			<td background="${RESOURCE}/eng/images/14_table_05.gif"><img src="${RESOURCE}/eng/images/14_table_05.gif" width="10" height="10" /></td>
																			<td width="1"><img src="${RESOURCE}/eng/images/14_table_02.gif" width="10" height="10" /></td>
																		  </tr>
																		  <tr>
																			<td background="${RESOURCE}/eng/images/14_table_06.gif"><img src="${RESOURCE}/eng/images/14_table_06.gif" width="10" height="10" /></td>

																			<td align="center" valign="top"><table width="100%" border="0" align="center" cellpadding="2" cellspacing="1">
																			  <tr>
																				<td height="30" colspan="6" align="center" valign="middle" bgcolor="#FFFFFF"><table width="95%" border="0" cellspacing="3" cellpadding="0">
																									<tr>
																									  <td width="29%" class="textnormal_bold">Search name</td>
																									  <td width="29%"><input name="name" type="text" class="txt_search_c04" size="13" maxlength="10" autocomplete="off" value="" onKeyDown="chkKeyEnter()"></td>
																									  <td width="42%"><input type="image" name="action" src="${RESOURCE}/eng/images/14_webservice_search_01.gif" width="58" height="23"  value="search" onClick="return search();"/></td>
																									</tr>

																								  </table>																				</td>
																			  </tr>
																			  <tr>
																				<td width="6%" height="30" align="center" valign="middle" bgcolor="#0ABBE0">&nbsp;</td>
																				<td width="5%" align="center" valign="middle" bgcolor="#0ABBE0" class="textnormalwhite_bold">No.</td>
																				<td width="18%" align="center" valign="middle" bgcolor="#0ABBE0" class="textnormalwhite_bold"><a href="javascript:doSortDesc('N', '', '')" class="link2white">Nick name <img src="${RESOURCE}/eng/images/sorting_up.gif" width="12" height="8" border="0"></a></td>
																				<td width="25%" align="center" valign="middle" bgcolor="#0ABBE0" class="textnormalwhite_bold">&nbsp;<a href="javascript:doSortDesc('', 'N', '')" class="link2white">Name <img src="${RESOURCE}/eng/images/sorting_up.gif" width="12" height="8" border="0"></a></td>

																				<td width="25%" align="center" valign="middle" bgcolor="#0ABBE0" class="textnormalwhite_bold"><a href="javascript:doSortDesc('', '', 'N')" class="link2white">&nbsp;Surname <img src="${RESOURCE}/eng/images/sorting_up.gif" width="12" height="8" border="0"></a></td>
																				<td width="17%" align="center" valign="middle" bgcolor="#0ABBE0" class="textnormalwhite_bold">Number</td>
																			  </tr>
																	 
																			  <tr id="tr_1" onclick='if (!document.layers) {var cb=document.getElementById("checkPhoneBook_1"); cb.checked=!cb.checked}' bgcolor="">
																				<td colspan="6"><table width="100%" border="0" cellspacing="0" cellpadding="0">
																				  <tr>
																					<td width="6%" align="center"><input type="checkbox" id="checkPhoneBook_1" name="PhonebookId[]" value="5107366331"  onclick='if (!document.layers) {this.checked=!this.checked}' /></td>
																					<td width="5%" align="center" valign="top" class="textnormal">1</td>

																					<td width="18%" align="center" valign="top" class="textnormal">โน้ต</td>
																					<td width="25%" align="justify" valign="top" class="textnormal">&nbsp;&nbsp;</td>
																					<td width="25%" align="justify" valign="top" class="textnormal">&nbsp;&nbsp;</td>
																					<td width="17%" align="center" valign="top" class="textnormal">0896902976</td>
																					<input type="hidden" name="PhoneBookId1" value="5107366331">
																				  </tr>
																				</table></td>
																			  </tr>

																	
																			  <tr id="tr_2" onclick='if (!document.layers) {var cb=document.getElementById("checkPhoneBook_2"); cb.checked=!cb.checked}' bgcolor="#E0E0E0">
																				<td colspan="6"><table width="100%" border="0" cellspacing="0" cellpadding="0">
																				  <tr>
																					<td width="6%" align="center"><input type="checkbox" id="checkPhoneBook_2" name="PhonebookId[]" value="5106621095"  onclick='if (!document.layers) {this.checked=!this.checked}' /></td>
																					<td width="5%" align="center" valign="top" class="textnormal">2</td>
																					<td width="18%" align="center" valign="top" class="textnormal">นก</td>
																					<td width="25%" align="justify" valign="top" class="textnormal">&nbsp;&nbsp;</td>
																					<td width="25%" align="justify" valign="top" class="textnormal">&nbsp;&nbsp;</td>

																					<td width="17%" align="center" valign="top" class="textnormal">0891377567</td>
																					<input type="hidden" name="PhoneBookId2" value="5106621095">
																				  </tr>
																				</table></td>
																			  </tr>
																	
																			  <tr id="tr_3" onclick='if (!document.layers) {var cb=document.getElementById("checkPhoneBook_3"); cb.checked=!cb.checked}' bgcolor="">
																				<td colspan="6"><table width="100%" border="0" cellspacing="0" cellpadding="0">
																				  <tr>

																					<td width="6%" align="center"><input type="checkbox" id="checkPhoneBook_3" name="PhonebookId[]" value="5106690045"  onclick='if (!document.layers) {this.checked=!this.checked}' /></td>
																					<td width="5%" align="center" valign="top" class="textnormal">3</td>
																					<td width="18%" align="center" valign="top" class="textnormal">พี่ตรี</td>
																					<td width="25%" align="justify" valign="top" class="textnormal">&nbsp;&nbsp;</td>
																					<td width="25%" align="justify" valign="top" class="textnormal">&nbsp;&nbsp;</td>
																					<td width="17%" align="center" valign="top" class="textnormal">0894569830</td>
																					<input type="hidden" name="PhoneBookId3" value="5106690045">

																				  </tr>
																				</table></td>
																			  </tr>
																	
																			  <tr id="tr_4" onclick='if (!document.layers) {var cb=document.getElementById("checkPhoneBook_4"); cb.checked=!cb.checked}' bgcolor="#E0E0E0">
																				<td colspan="6"><table width="100%" border="0" cellspacing="0" cellpadding="0">
																				  <tr>
																					<td width="6%" align="center"><input type="checkbox" id="checkPhoneBook_4" name="PhonebookId[]" value="5106696867"  onclick='if (!document.layers) {this.checked=!this.checked}' /></td>
																					<td width="5%" align="center" valign="top" class="textnormal">4</td>

																					<td width="18%" align="center" valign="top" class="textnormal">เล็ก</td>
																					<td width="25%" align="justify" valign="top" class="textnormal">&nbsp;&nbsp;</td>
																					<td width="25%" align="justify" valign="top" class="textnormal">&nbsp;&nbsp;</td>
																					<td width="17%" align="center" valign="top" class="textnormal">0851997859</td>
																					<input type="hidden" name="PhoneBookId4" value="5106696867">
																				  </tr>
																				</table></td>
																			  </tr>

																	
																			  <tr id="tr_5" onclick='if (!document.layers) {var cb=document.getElementById("checkPhoneBook_5"); cb.checked=!cb.checked}' bgcolor="">
																				<td colspan="6"><table width="100%" border="0" cellspacing="0" cellpadding="0">
																				  <tr>
																					<td width="6%" align="center"><input type="checkbox" id="checkPhoneBook_5" name="PhonebookId[]" value="5106690025"  onclick='if (!document.layers) {this.checked=!this.checked}' /></td>
																					<td width="5%" align="center" valign="top" class="textnormal">5</td>
																					<td width="18%" align="center" valign="top" class="textnormal">เบียร์</td>
																					<td width="25%" align="justify" valign="top" class="textnormal">&nbsp;&nbsp;</td>
																					<td width="25%" align="justify" valign="top" class="textnormal">&nbsp;&nbsp;</td>

																					<td width="17%" align="center" valign="top" class="textnormal">0873291981</td>
																					<input type="hidden" name="PhoneBookId5" value="5106690025">
																				  </tr>
																				</table></td>
																			  </tr>
																	
																			  <tr id="tr_6" onclick='if (!document.layers) {var cb=document.getElementById("checkPhoneBook_6"); cb.checked=!cb.checked}' bgcolor="#E0E0E0">
																				<td colspan="6"><table width="100%" border="0" cellspacing="0" cellpadding="0">
																				  <tr>

																					<td width="6%" align="center"><input type="checkbox" id="checkPhoneBook_6" name="PhonebookId[]" value="5106690027"  onclick='if (!document.layers) {this.checked=!this.checked}' /></td>
																					<td width="5%" align="center" valign="top" class="textnormal">6</td>
																					<td width="18%" align="center" valign="top" class="textnormal">ทะ</td>
																					<td width="25%" align="justify" valign="top" class="textnormal">&nbsp;&nbsp;</td>
																					<td width="25%" align="justify" valign="top" class="textnormal">&nbsp;&nbsp;</td>
																					<td width="17%" align="center" valign="top" class="textnormal">0819878234</td>
																					<input type="hidden" name="PhoneBookId6" value="5106690027">

																				  </tr>
																				</table></td>
																			  </tr>
																	
																			  <tr id="tr_7" onclick='if (!document.layers) {var cb=document.getElementById("checkPhoneBook_7"); cb.checked=!cb.checked}' bgcolor="">
																				<td colspan="6"><table width="100%" border="0" cellspacing="0" cellpadding="0">
																				  <tr>
																					<td width="6%" align="center"><input type="checkbox" id="checkPhoneBook_7" name="PhonebookId[]" value="5106690029"  onclick='if (!document.layers) {this.checked=!this.checked}' /></td>
																					<td width="5%" align="center" valign="top" class="textnormal">7</td>

																					<td width="18%" align="center" valign="top" class="textnormal">เฮง</td>
																					<td width="25%" align="justify" valign="top" class="textnormal">&nbsp;&nbsp;</td>
																					<td width="25%" align="justify" valign="top" class="textnormal">&nbsp;&nbsp;</td>
																					<td width="17%" align="center" valign="top" class="textnormal">0890170200</td>
																					<input type="hidden" name="PhoneBookId7" value="5106690029">
																				  </tr>
																				</table></td>
																			  </tr>

																	
																			  <tr id="tr_8" onclick='if (!document.layers) {var cb=document.getElementById("checkPhoneBook_8"); cb.checked=!cb.checked}' bgcolor="#E0E0E0">
																				<td colspan="6"><table width="100%" border="0" cellspacing="0" cellpadding="0">
																				  <tr>
																					<td width="6%" align="center"><input type="checkbox" id="checkPhoneBook_8" name="PhonebookId[]" value="5106690033"  onclick='if (!document.layers) {this.checked=!this.checked}' /></td>
																					<td width="5%" align="center" valign="top" class="textnormal">8</td>
																					<td width="18%" align="center" valign="top" class="textnormal">ตี้</td>
																					<td width="25%" align="justify" valign="top" class="textnormal">&nbsp;&nbsp;</td>
																					<td width="25%" align="justify" valign="top" class="textnormal">&nbsp;&nbsp;</td>

																					<td width="17%" align="center" valign="top" class="textnormal">0840007326</td>
																					<input type="hidden" name="PhoneBookId8" value="5106690033">
																				  </tr>
																				</table></td>
																			  </tr>
																	
																			  <tr id="tr_9" onclick='if (!document.layers) {var cb=document.getElementById("checkPhoneBook_9"); cb.checked=!cb.checked}' bgcolor="">
																				<td colspan="6"><table width="100%" border="0" cellspacing="0" cellpadding="0">
																				  <tr>

																					<td width="6%" align="center"><input type="checkbox" id="checkPhoneBook_9" name="PhonebookId[]" value="5106690037"  onclick='if (!document.layers) {this.checked=!this.checked}' /></td>
																					<td width="5%" align="center" valign="top" class="textnormal">9</td>
																					<td width="18%" align="center" valign="top" class="textnormal">เทพ</td>
																					<td width="25%" align="justify" valign="top" class="textnormal">&nbsp;&nbsp;</td>
																					<td width="25%" align="justify" valign="top" class="textnormal">&nbsp;&nbsp;</td>
																					<td width="17%" align="center" valign="top" class="textnormal">0870966578</td>
																					<input type="hidden" name="PhoneBookId9" value="5106690037">

																				  </tr>
																				</table></td>
																			  </tr>
																	
																			  <tr id="tr_10" onclick='if (!document.layers) {var cb=document.getElementById("checkPhoneBook_10"); cb.checked=!cb.checked}' bgcolor="#E0E0E0">
																				<td colspan="6"><table width="100%" border="0" cellspacing="0" cellpadding="0">
																				  <tr>
																					<td width="6%" align="center"><input type="checkbox" id="checkPhoneBook_10" name="PhonebookId[]" value="5106690041"  onclick='if (!document.layers) {this.checked=!this.checked}' /></td>
																					<td width="5%" align="center" valign="top" class="textnormal">10</td>

																					<td width="18%" align="center" valign="top" class="textnormal">เจน</td>
																					<td width="25%" align="justify" valign="top" class="textnormal">&nbsp;&nbsp;</td>
																					<td width="25%" align="justify" valign="top" class="textnormal">&nbsp;&nbsp;</td>
																					<td width="17%" align="center" valign="top" class="textnormal">0839183738</td>
																					<input type="hidden" name="PhoneBookId10" value="5106690041">
																				  </tr>
																				</table></td>
																			  </tr>

																	          
																			</table></td>
																			<td background="${RESOURCE}/eng/images/14_table_07.gif"><img src="${RESOURCE}/eng/images/14_table_07.gif" width="10" height="10" /></td>
																		  </tr>
																		  <tr>
																			<td><img src="${RESOURCE}/eng/images/14_table_03.gif" width="10" height="10" /></td>
																			<td background="${RESOURCE}/eng/images/14_table_08.gif"><img src="${RESOURCE}/eng/images/14_table_08.gif" width="10" height="10" /></td>
																			<td><img src="${RESOURCE}/eng/images/14_table_04.gif" width="10" height="10" /></td>
																		  </tr>
																		</table>																	</td>

																</tr>

															

                                                                <tr>
                                                                <td align="center">
                                                                << back page :  <a href='javascript:changePage(1)' class='link2'><u>1</u></a> <a href='javascript:changePage(2)' class='link2'>2</a> next >>
                                                                </td>
                                                                </tr>

													      	</table>
													      	<table width="100%" border="0" cellspacing="0" cellpadding="0">
													        	<tr> 
													          		<td align="center" class="head"><p><br>
													          		<table width="37%" border="0" cellspacing="0" cellpadding="0">
              <tr align="center"> 
<!--                <td><a href="javascript:MM_openBrWindow('/bp3/bin/SMSAddPhoneBook','add','width=700,height=550')" class="textnormalpink_bold"><img src="${RESOURCE}/eng/images/14_webservice_add.gif" width="58" height="23" border="0"></a></td>
                <td><a href="javascript:editPhonebook('form1','PhonebookId[]','/bp3/bin/SMSEditPhoneBook')"><img src="${RESOURCE}/eng/images/14_webservice_edit.gif" width="58" height="23" border="0"></a></td>-->
<!--                <td><a href="javascript:openAddWindow()" class="textnormalpink_bold"><img src="${RESOURCE}/eng/images/14_webservice_add.gif" width="58" height="23" border="0"></a></td>
                <td><a href="javascript:openEditWindow()"><img src="${RESOURCE}/eng/images/14_webservice_edit.gif" width="58" height="23" border="0"></a></td>-->
                <td><a href="javascript:wrapAddWindow()" class="textnormalpink_bold"><img src="${RESOURCE}/eng/images/14_webservice_add.gif" width="58" height="23" border="0"></a></td>
                <td><a href="javascript:wrapEditWindow()"><img src="${RESOURCE}/eng/images/14_webservice_edit.gif" width="58" height="23" border="0"></a></td>

                <td><a href="javascript:delPhonebook('form1','PhonebookId[]','SMSPhoneBookList')"><img src="${RESOURCE}/eng/images/14_webservice_delete_01.gif" width="58" height="23" border="0"></a></td>
              </tr>
            </table>
													          		  <table width="100%" align="center" border="0">
																			<td align="left"><span class="textnormal"><br>
     There are currently</span> 
            <font color="#FF0000" class="textnormalred_bold">18</font> <span class="textnormal">stored names in this list</span></td>

        </tr>
        <tr> 
          <td align="left">&nbsp;</td>
        </tr>
        <tr> 
          <td align="left"><font class="textnormalred_bold">Note:</font></td>
        </tr>
        <tr> 
          <td align="left"><span class="textnormal">You can store up to</span> 
            <font color="#FF0000" class="textnormalred_bold">200</font> <span class="textnormal">names</span></td>

        </tr>
																	  </table>
													          <br></td>
													        	</tr>
													      </table>
													      <span class="textnormal"><span class="head"><img src="${RESOURCE}/eng/images/14_webservice_remark.gif" width="95" height="33"></span></span>
														  <table width="95%" border="0" align="center" cellpadding="0" cellspacing="3">
															<tr>
															  <td width="2%" valign="baseline"><img src="${RESOURCE}/eng/images/bullet_grey.gif" width="9" height="9"></td>

															  <td width="98%" align="left" class="textnormal">Message(s) submitted  from this system is considered final and complete.</td>
															</tr>
															<tr>
															  <td valign="baseline"><img src="${RESOURCE}/eng/images/bullet_grey.gif" width="9" height="9"></td>
															  <td align="left" class="textnormal">Service fee &amp;  quota details</td>
															</tr>
															<tr>

															  <td valign="baseline">&nbsp;</td>
															  <td align="left" class="textnormal"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="3">
																
																
																<tr>
																  <td width="2%" valign="baseline"><img src="${RESOURCE}/eng/images/bullet_grey.gif" width="9" height="9"></td>
																  <td width="98%" align="left" class="textnormal">For sending to dtac number, the system will deduct from the monthly quota based on the submitted message. The deduction is final and will not be returned in the event that the user cancels the scheduled SMS message.</td>
																</tr>
																<tr>
																  <td valign="baseline"><img src="${RESOURCE}/eng/images/bullet_grey.gif" width="9" height="9"></td>

																  <td align="left" class="textnormal">For sending to non-dtac number  or sending messages over the quota, the system  will charge the user's account immediately upon sending.</td>
																</tr>
																
															  </table></td>
															</tr>
															<tr>
															  <td valign="baseline"><img src="${RESOURCE}/eng/images/bullet_grey.gif" width="9" height="9"></td>
															  <td align="left" class="textnormal">The company reserves the right not to refund any charge and service charge which might happen from sent to the wrong number or number is not in service, changes in any charges, regulations or service applications. In addition, the subscriber is not allowed to use the service to seek out profit in corruption way, illegal or company will cancel the service as appropriate.</td>
															</tr>

															<tr>
															  <td height="10" colspan="2" valign="baseline"><img src="${RESOURCE}/eng/imagesimages/clear.gif" width="1" height="1"></td>
															</tr>
															<tr>
															  <td colspan="2" valign="baseline"><a href="/bp3/bin/GuestTermOfService" class="textnormal_blue">Terms and Conditions of Happy Web Services</a><span class="textnormalred">|</span><a href="#" class="textnormalred" onClick="MM_openBrWindow('http://www.happy.co.th/eservice/sms_rules_en.php','PopUp','')">Terms of Use Web Services</a></td>
															</tr>
														  </table>

														  <p>&nbsp;</p>
														  <table>
															<tr> 
                                        						<td height="15" align="left"><a href="/bp3/bin/Dspc/DpromptWelcome"><img src="${RESOURCE}/eng/images/14_webservice_main.gif" border="0"></a></td>
                                      						</tr>
														  </table>
													      <p>&nbsp;</p></td>
													  </tr>
													 
													  
													</table>

													</form>

						
						
						<!-- เอา Content ใส่ ระหว่างนี้ -->							</td>
                      </tr>
                    </table>
                       
                <!--เนื้อหาสิ้นสุดที่นี่-->
                
            </div>
            <div class="content-bottom"></div>
        </div>
    </div>
</div>
<div id="footer">
<img src="${RESOURCE}/eng/images/copy_right.jpg" />
<a href="http://www.dtac.co.th" target="_blank"><img src="${RESOURCE}/eng/images/dtact_logo.jpg" border="0" /></a>
<a href="http://www.happyvirus.com" target="_blank"><img src="${RESOURCE}/eng/images/virus_icon.jpg" border="0" /></a>
</div>
</body>
</html>